<?php

namespace catchAdmin\phone\controller;

use catchAdmin\phone\request\wechatUserBalance\indexTypeRequest;
use catchAdmin\phone\request\wechatUserBalance\rechargeBalanceRequest;
use catchAdmin\phone\request\wechatUserBalance\WithdrawIncomeRequest;
use catcher\CatchResponse;

class WechatUserBalance extends LoginCatchController
{

    private $model = null;


    public function __construct()
    {
        parent::__construct();

        $this->model = (new \catchAdmin\phone\model\WechatUserBalance());
    }


    /**
     * 充值
     */
    public function rechargeBalance(rechargeBalanceRequest $request)
    {
        $param = request()->param();

        return CatchResponse::success($this->model->rechargeBalance($param));
    }


    /**
     * 提现
     */
    public function withdrawIncome(WithdrawIncomeRequest $request)
    {
        $param = request()->param();

        return CatchResponse::success($this->model->withdrawIncome($param));
    }


    ######################### 显示 ###########################


    /**
     * 充值列表
     */
    public function index()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexData($param));
    }


    /**
     * 充值列表
     */
    public function indexType(indexTypeRequest $request)
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexType($param));
    }


    /**
     * 充值列表
     */
    public function indexRechargeBalance()
    {
        $param = request()->param();

        return CatchResponse::success($this->model->indexRechargeBalance($param));
    }


}
